//
//  SourceReference.h
//  LightBasic
//
//  Created by Albert on 28/03/2011.
//  Copyright 2011 LightBasic Development Team. All rights reserved.
//
#pragma once

namespace lbc {
    
    /**
     * Represent a source location
     */
    struct SourceLocation
    {
        /// create Source Reference
        SourceLocation(unsigned int line, unsigned short column, unsigned short length)
            : line(line), column(column), length(length)
        {}
        
        /// copy contructor
        SourceLocation(const SourceLocation & loc) : line(loc.line), column(loc.column), length(loc.length)
        {}
        
        /// get thhe line
        inline unsigned int GetLine() const { return line; }
        
        /// get the column
        inline unsigned short GetColumn() const { return column; }
        
        /// get length
        inline unsigned short GetLength() const { return length; }
        
        /// the line
        unsigned int   line;
        /// the column
        unsigned short column;
        /// length
        unsigned short length;
    };
    
}
